<!-- daterange picker -->
<?php
/* @var $this yii\web\View */
use common\Utils\Info;

$this->title = "新建会议";
\common\Utils\ViewUtils::addAssetBundle($this, \backend\assets\Daterangepicker::className());
$this->registerJs(<<<HTML_JS
$('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'YYYY/MM/DD H:mm'});
HTML_JS
);
?>

	<style type="text/css">
		body, html{width: 100%;height: 100%;margin:0;font-family:"微软雅黑";font-size:14px;}
		#l-map{height:300px;width:100%;}
		#r-result{width:100%;}
	</style>

	
<div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-6">
        <!-- general form elements disabled -->
        <div class="box box-info">
            <div class="box-header">
                <h3 class="box-title">新建会议</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
                <form role="form" action="<?= \yii\helpers\Url::to(['meeting/add']) ?>" method="post">
                    <!-- text input -->
                    <div class="form-group">
                        <label>会议主题</label>
                        <input type="text" name="title" class="form-control" placeholder="会议主题"
                               value="<?= Info::formValue('title') ?>">
                    </div>

                    <!-- textarea -->
                    <div class="form-group">
                        <label>会议简介</label>
                        <textarea class="form-control" name="describe" rows="3"
                                  placeholder="会议简介"><?= Info::formValue('describe') ?></textarea>
                    </div>

                    <div class="form-group">
                        <label>开始时间-结束时间:</label>

                        <div class="input-group">
                            <div class="input-group-addon">
                                <i class="fa fa-clock-o"></i>
                            </div>
                            <input type="text" class="form-control pull-right" name="active_time" placeholder="请选择时间"
                                   value="<?= Info::formValue('active_time') ?>"
                                   id="reservationtime"/>
                        </div>
                        <!-- /.input group -->
                    </div>

                    <div class="form-group">
                        <label>会议地点</label>
                        <div id="l-map" style="display: none;"></div>
                        <div id="r-result">
                        <input type="text" value="<?= Info::formValue('location_name') ?>" onchange="bdGEO();" id="suggestId" class="form-control" name="location_name" placeholder="请先地图选点">
                        </div>
                        <div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
                    </div>
                    
                    <div class="form-group">
                        <label>会议经纬度</label>
                        <input type="text" value="<?= Info::formValue('location') ?>" class="form-control" id="result_"
                               name="location" placeholder="请先地图选点">
                    </div>


                    <div class="form-group">
                        <label>签到验证方式</label>

                        <div class="form-group">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" name="method[code]"
                                        <?= Info::formCheck("method", 'code') ?>>
                                    扫描二维码
                                </label>
                            </div>
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox"
                                           name="method[location]" <?= Info::formCheck("method", 'location') ?>>
                                    验证基于地理信息
                                </label>
                            </div>
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox"
                                           name="method[check_id]" <?= Info::formCheck("method", 'check_id') ?>>
                                    邀请码签到
                                </label>
                            </div>
                        </div>
                    </div>
                    <div style="height:10px;"></div>
                    <?= \common\Utils\FormUtils::csrfField() ?>
                    <button type="submit" class="btn btn-primary">提交</button>
                </form>


            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>